import logging,yagmail
import time

def time_str():
    return time.strftime('%Y%m%d%H%M%S',time.localtime())

def log_send(filename):
    logging.basicConfig(filename=f'{filename}.log',filemode='a+',format='%(filename)s--%(asctime)s--%(levelname)s--%(message)s',level=logging.DEBUG)

def send_email(filename):
    email=yagmail.SMTP(user='1038995773@qq.com',password='pahznimdvxdtbegi',host='smtp.qq.com')
    email.send(to='1038995773@qq.com',subject='酒仙网系统Web Ui自动化测试报告',contents='酒仙网测试',attachments=filename)





